#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s;
	cin >> s;
	int len = s.length();
	int num = 0;
	double is_fu = 1;
	int is_ou = 1;
	if (s.front() == '-')
	{
		len--;
		is_fu = 1.5;
	}
	if (s.back() % 2 == 0)
	{
		is_ou = 2;
	}
	while (s.find('2') != -1)
	{
		int z = s.find('2');
		num++;
		s.erase(z, 1);
	}
	double q = num * 1.0 / len * is_fu * is_ou * 100;
	printf("%.2lf%\n", q);
	return 0;
}